package smartcampus.scjava.POJO.DO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 学费详情表，存储学费类型和该类型对应的金额
 * @TableName tuition_type
 */
@TableName(value ="tuition_type")
public class TuitionType implements Serializable {
    /**
     * 主键自增长
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 学费类型，便于查询
     */
    private Integer type;

    /**
     * 学费金额
     */
    private Integer money;

    /**
     * 学费名称
     */
    private String feename;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 主键自增长
     */
    public Integer getId() {
        return id;
    }

    /**
     * 主键自增长
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 学费类型，便于查询
     */
    public Integer getType() {
        return type;
    }

    /**
     * 学费类型，便于查询
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * 学费金额
     */
    public Integer getMoney() {
        return money;
    }

    /**
     * 学费金额
     */
    public void setMoney(Integer money) {
        this.money = money;
    }

    /**
     * 学费名称
     */
    public String getFeename() {
        return feename;
    }

    /**
     * 学费名称
     */
    public void setFeename(String feename) {
        this.feename = feename;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TuitionType other = (TuitionType) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getMoney() == null ? other.getMoney() == null : this.getMoney().equals(other.getMoney()))
            && (this.getFeename() == null ? other.getFeename() == null : this.getFeename().equals(other.getFeename()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getMoney() == null) ? 0 : getMoney().hashCode());
        result = prime * result + ((getFeename() == null) ? 0 : getFeename().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", type=").append(type);
        sb.append(", money=").append(money);
        sb.append(", feename=").append(feename);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}